<extend name="Users:layout" />
<block name="content">
 <link rel="stylesheet" type="text/css" href="__PUBLIC__/plugins/webuploader/style.css" />
<link rel="stylesheet" type="text/css" href="__PUBLIC__/plugins/webuploader/webuploader.css" />
<script type="text/javascript" src="__PUBLIC__/plugins/webuploader/webuploader.js"></script>
<script type="text/javascript" src="__JS__/sharebatchupload.js"></script>
    <body style="background-color:#f5f5f5;">
    <div class='wst-page-header'>买家中心 > 提交晒单</div>
        <div style="text-align:center;">
        	<div class="wst-appraise-box" style="margin:0px;">
				<div class='main' style="border-style:none;">

					<div class="head">
						<div class="goods-name" style="width:585px;">商品</div>
						<div class="goods-status" style="width:150px;">晒单内容</div>
						<div class="goods-buy-time" style="width:90px;">购买时间</div>
						<div style="clear: both;"></div>
					</div>
						
					<div class="selgoods">
						<div class="goods-name goods-txt">
							<div>
								<div style="float: left;width: 65px;">
								<a href="{:U('Home/Goods/getGoodsDetails',array('goodsId'=>$goods['goodsId']))}" target="_blank">
								<img src="__ROOT__/{$goods['goodsThums']}" width="60" height="60" class='goods-img'/>
								</a>
								</div>
								<div class='goods-name2 goods-txt' style="line-height:normal;padding-top:25px;">
									<a href="{:U('Home/Goods/getGoodsDetails',array('goodsId'=>$goods['goodsId']))}" target="_blank">{$goods["goodsName"]}</a><br/>
				        			{$goods["goodsAttrName"]}
								</div>
							</div>
						</div>
						<div id="{$goods['goodsId']}_status" class="goods-status goods-txt">
							<if condition='$goods["sId"] eq ""'>
							未晒单
							<else/>
							已晒单
							</if>
						</div>
						<div class="goods-buy-time goods-txt" style="width:120px;">{$orderInfo['order']['createTime']}
						</div>
						<div style="clear: both;"></div>
					</div>
					<if condition='$goods["sId"] eq ""'>
					<div id="{$goods['goodsId']}_appraise" class="appraise-box">
						<div class="main-box">
							<!--标题-->
							<div class="item" style="margin-left:-205px;">
								<div class='title'>标题：</div>					
								<div class='content'>									
									<input type='text' name="{$goods['goodsId']}_title" id="{$goods['goodsId']}_title" />
								</div>
								<div style="clear: both;"></div>
							</div>
							<!--晒图-->
							<div class="item">
							<div style="float:left;margin-left:-45px;">晒图：</div>
					       	<div id='galleryImgs' class='wst-gallery-imgs'>
					       		<if condition="count($object['shopAds']) eq 0" >
			                       <div id="wrapper">
			                           <div id="container" style="width:670px;height: 240px;">
			                              <div id="uploader">
			                               <div class="queueList">
			                                   <div id="dndArea" class="placeholder" style="width:640px;min-height: 60px;">
			                                      <div id="filePicker" style="margin-top: -130px;"></div>
			                                      </div>
			                                   <ul class="filelist" style="clear:none;"></ul>
			                               </div>
			                             <div class="statusBar" style="display:none;min-height:20px;">
			                               <div class="progress">
			                                    <span class="text">0%</span>
			                                    <span class="percentage"></span>
			                               </div>
			                                    <div class="info"></div>
			                               <div class="btns">
			                                 <div id="filePicker2" class="webuploader-containe webuploader-container"></div><div class="uploadBtn state-finish">开始上传</div>
			                               </div>
			                            </div>
			                         </div>
			                      </div>
			                   </div>
			               <else/>
			               	<div id="wrapper">
			                       <div id="container">
			                       		<div style="border-bottom:1px solid #dadada;padding-left:10px; ">
			                          		图片大小:1400 x 350 (px)(格式为 gif, jpg, jpeg, png)
			                   			</div>
			                          	<div id="uploader">
			                             <div class="queueList">
			                                 <div id="dndArea" class="placeholder element-invisible">
			                                    <div id="filePicker" class="webuploader-container"></div>
			                                    </div>
			                                 <ul class="filelist">
			                                 	<volist name="object['shopAds']" id="vo" key='i'>
											       <li style="border: 1px solid rgb(59, 114, 165)" order="100" onmouseover="imglimouseover(this)" onmouseout="imglimouseout(this)">
											       		<input type="hidden" class="gallery-img" iv="{$vo.adImg_thumb}" v="{$vo.adImg}" />
												       <img width="152" height="152" src="__ROOT__/{$vo.adImg_thumb}"><span class="setdef" style="display:none">默认</span><span class="setdel" onclick="imglidel(this)" style="display:none">删除</span>
											       	   <input class="gallery-img-url"  placeholder="广告路径" type="text" style="width:118px;" value="{$vo.adUrl}"/>
											       </li>
												</volist>                             	
			                                 </ul>
			                            </div>
			                            <div class="statusBar" style="">
			                               <div class="progress">
			                                    <span class="text"></span>
			                                    <span class="percentage"></span>
			                               </div>
			                               <div class="info"></div>
			                               <div class="btns">
			                                  <div id="filePicker2" class="webuploader-containe webuploader-container"></div>
			                                  <div class="uploadBtn state-finish">开始上传</div>
			                               </div>
			                            </div>
			                        </div>
			                    </div>
			                 </div>
			               </if>
					       </div>
					       <div style='clear:both;'></div>
					       </div>
							<!--评论-->
							<div class="item"  style="margin-left:-205px;">
								<div class='title'>晒单内容：</div>					
								<div class='content'>									
									<textarea rows="5" cols="70" style="width:610px;" name="{$goods['goodsId']}_content" id="{$goods['goodsId']}_content" maxlength="50"></textarea>
								</div>
								<div style="clear: both;"></div>
							</div>
							<div id="checkout" class="btn-box" >						
								<a class="btn-submit" href="javascript:;" onclick="addShareAppraises({$orderInfo['order']['shopId']},{$goods['goodsId']},{$orderInfo['order']['orderId']})">
									<button class='wst-btn-query'>晒单</button>
								</a>
								<button type="button" class="wst-btn-query" onclick='javascript:location.href="{$referer}"'>返&nbsp;回</button>
								<div style="clear: both;"></div>
							</div>
							<div style="clear: both;"></div>
						</div>
					</div>
					</if>				
				</div>
			</div>
        </div>
    </body>
</block>
